cmake_minimum_required(VERSION 2.6)

SET(LUAS_LIST 
lapi.c
lauxlib.c
lbaselib.c
lcode.c
ldblib.c
ldebug.c
ldo.c
ldump.c
lfunc.c
lgc.c
linit.c
liolib.c
llex.c
lmathlib.c
lmem.c
loadlib.c
lobject.c
lopcodes.c
loslib.c
lparser.c
lstate.c
lstring.c
lstrlib.c
ltable.c
ltablib.c
ltm.c
lua.c
luac.c
lundump.c
lvm.c
lzio.c
main.c
print.c
lapi.h
lauxlib.h
lcode.h
ldebug.h
ldo.h
lfunc.h
lgc.h
llex.h
llimits.h
lmem.h
lobject.h
lopcodes.h
lparser.h
lstate.h
lstring.h
ltable.h
ltm.h
lua.h
luaconf.h
lualib.h
lundump.h
lvm.h
lzio.h


)

ADD_LIBRARY(luastatic STATIC 
${LUAS_LIST}
)
INSTALL(TARGETS luastatic
     RUNTIME DESTINATION bin
     LIBRARY DESTINATION lib
     ARCHIVE DESTINATION lib
     )
IF(UNIX)
	TARGET_LINK_LIBRARIES(luastatic m dl readline)
ENDIF(UNIX)
